<?php

namespace app\admin\validate;

use think\Validate;

class Configure extends Validate
{
    protected $scene = [
        'BoxShop' => ['shop_name','shop_phone','address','province_id','city_id','area_id','street_id','lon','lat'],
    ];

    protected $rule =   [
		'shop_name' => 'require|max:25',
		'shop_phone' => 'require|mobile',
		'address' => 'require',
		'province_id' => 'require|number',
		'city_id' => 'require|number',
		'area_id' => 'require|number',
		'street_id' => 'require|number',
		'lon' => 'require',
		'lat' => 'require',
	];

    protected $message  =   [
		'shop_name.require' => '请填写店铺名称',
		'shop_phone.require' => '请填写店铺联系电话',
		'shop_phone.mobile' => '请填写正确电话',
		'address.require' => '请填写详细地址',
		'province_id.require' => '省名称必须选择',
		'province_id.number' => '省名称必须选择',
		'city_id.require' => '市名称必须选择',
		'city_id.number' => '市名称必须选择',
		'area_id.require' => '区名称必须选择',
		'area_id.number' => '区名称必须选择',
		'street_id.require' => '街道名称必须选择',
		'street_id.number' => '街道名称必须选择',
        'lon.require' => '请填写经纬度',
        'lat.require'  => '请填写经纬度',
    ];

}
